package cn.com.css.taxInspection.gt3.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import cn.com.css.taxInspection.gt3.entity.JcAyxxDebugEntity;
import cn.com.css.taxInspection.gt3.mapper.JcAyxxDebugMapper;
import cn.com.css.taxInspection.gt3.service.JcAyxxDebugService;
import cn.com.css.taxInspection.util.TsBqUtils;



@Service("jcAyxxDebugService")
public class JcAyxxDebugServiceImpl extends ServiceImpl<JcAyxxDebugMapper, JcAyxxDebugEntity> implements JcAyxxDebugService {
	
	@Override
	@DS("oracle")
	public void saveByDebugtaxorg(String currentUserId, String debugtaxorg, String content,String jcajxxuuid) {
		JcAyxxDebugEntity _jcAyxxDebugEntity = this.getById(jcajxxuuid);
		if(TsBqUtils.isNull(_jcAyxxDebugEntity)){
			JcAyxxDebugEntity jcAyxxDebugEntity = new JcAyxxDebugEntity();
			jcAyxxDebugEntity.setJcayxxuuid(jcajxxuuid); 
			jcAyxxDebugEntity.setCreateId(currentUserId);
			jcAyxxDebugEntity.setSwjgDm(debugtaxorg);
			jcAyxxDebugEntity.setContent(content);
			this.save(jcAyxxDebugEntity);
		}else{
			_jcAyxxDebugEntity.setCreateId(currentUserId);
			_jcAyxxDebugEntity.setSwjgDm(debugtaxorg);
			_jcAyxxDebugEntity.setContent(content);
			
			this.updateById(_jcAyxxDebugEntity);
		}
		
	}


}